package org.javaboy.vhr.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 职位表
 */
@Data
public class Position implements Serializable {
    private Integer id;

    private String name;//职位名称

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date createDate;//创建时间

    private Boolean enabled;//是否有效 0：无效  1：有效

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Position position = (Position) o;
        return Objects.equals(name, position.name);
    }

    @Override
    public int hashCode() {

        return Objects.hash(name);
    }

    public Position() {

    }

    public Position(String name) {

        this.name = name;
    }

}
